package leo.data
{
	import flash.display.BitmapData;
	import flash.utils.Dictionary;
	/**
	 * 怪物数据 
	 * @author leo
	 * 
	 */
	public class MonsterVO
	{
		
		/**
		 * 向上行走 
		 */		
		public var dir_up :int = 1;
		public var dir_down :int = 2;
		public var dir_left :int = 3;
		public var dir_right :int = 4;
		/**
		 * 被消灭后能获得多少金币 
		 */		
		public var obtainGold :int;
		
		/**
		 * 图片字典中相乘的系数 
		 */		
		public var ratio :int = 10;
		/**
		 * 怪物行走速度 
		 */		
		public var walkSpeed :int;
		/**
		 * 怪物血量 
		 */		
		public var hp :int;
		/**
		 * 怪物类型 
		 */		
		public var type :int;
		/**
		 * 怪物名字 
		 */		
		public var name :String;
		/**
		 * x坐标 
		 */		
		public var tx :int;
		/**
		 * y坐标 
		 */		
		public var ty :int;
		public var imgUrl :String;
		public var id :String;
		public var bmdDict :Dictionary = new Dictionary();
		/**
		 * 图片信息列表 
		 */		
		public var bitmapDataList :Vector.<BitmapData>;
		public function MonsterVO()
		{
		}
		/**
		 * 创建怪物VO 
		 * @param obj
		 * 
		 */		
		public static function create(obj :Object):void
		{
			var monsterVOList :Vector.<MonsterVO> = GameModel.instance.monsterVOList;
			var monsterVO :MonsterVO = new MonsterVO();
			monsterVO.walkSpeed = obj.@walkSpeed;
			monsterVO.id = obj.@id;
			monsterVO.name = obj.@name;
			monsterVO.hp = obj.@hp;
			monsterVO.obtainGold = obj.@obtainGold;
			monsterVOList.push(monsterVO);
		}
	}
}